<!-- 公用部分开始 -->

<!-- ["姓名","学号","年龄"] -->
<!-- list表格头 -->
<script id="table-thead-template" type="text/x-handlebars-template">
	{{#each this}}
		<th>{{this}}</th>
	{{/each}}
</script>

<!--
	[{
		type:"success",
		size:"S",
		markClass:"",
		iconFont:"",
		name:""
	},{}]
-->
<!-- 文字图标按钮模板 -->
<script id="btn-text-template" type="text/x-handlebars-template">
    {{#each this}}
		{{#if select}}
		<span class="select-box radius" style="width:{{#if width}}{{ width }}{{else}}180{{/if}}px;">
  			<select class="select {{markClass}}" size="1" id="{{id}}">
				{{#with option}}
				{{#each this}}
					<option value="{{value}}" {{selected}}>{{text}}</option>
				{{/each}}
				{{/with}}
  		 	</select>
        </span>{{#if embellish}}{{{embellish}}}{{/if}}
		{{else}}
		<a href="javascript:;" class="btn btn-{{type}} radius size-{{size}} {{markClass}}" id="{{id}}"><i class="Hui-iconfont {{iMarkClass}}">{{{iconFont}}}</i> {{name}}</a>
    	{{/if}}
	{{/each}}
</script>


<!--
[{
	title:"",
	markClass:"",
	iconFont:""
},{}]
 -->
<!-- 图标按钮模板 -->
<script id="btn-icon-template" type="text/x-handlebars-template">
    {{#each this}}
		<a style="text-decoration:none" class="ml-5 {{markClass}}" href="javascript:;" title="{{title}}" id="{{id}}"><i class="Hui-iconfont" style="font-size:16px;">{{{iconFont}}}</i></a>
    {{/each}}
</script>

<!-- 说明面板 -->
<script id="explanation-mark-panel" type="text/x-handlebars-template">
<article class="page-container">
<div class="panel panel-{{{ inputValue style 'default' }}}">
	<div class="panel-header">{{{ inputValue title '说明' }}}</div>
	<div class="panel-body">{{{ content }}}</div>
</div>
</article>
</script>

<!-- 高级查询表单 -->
<!--<script id="advanced-query-form" type="text/x-handlebars-template">-->
<!--<article class="page-container">-->
<!--<form action="" method="post" class="form form-horizontal" id="advanced-query-form">-->
<!--	{{#each this}}-->
<!--	<div class="row cl">-->
<!--		{{#each this}}		-->
<!--		<div class="formControls col-xs-6 col-sm-6"><strong>{{label}}:</strong>-->
<!--			{{#if input}}-->
<!--				<input type="text" class="input-text" id="{{name}}" name="{{name}}" value="{{value}}" {{#if datetime}}query-datetime="true"{{/if}} {{#if datatype}}datatype="{{datatype}}"{{/if}} >-->
<!--			{{/if}}-->
<!--			{{#if select}}-->
<!--				<span class="select-box radius">-->
<!--				  <select class="select" size="1" id="{{name}}" name="{{name}}" value={{value}}>-->
<!--					<option value="">全部</option>-->
<!--				  	{{#with option}}-->
<!--					{{#each this}}-->
<!--						<option value="{{value}}">{{text}}</option>-->
<!--					{{/each}}-->
<!--					{{/with}}-->
<!--				  </select>-->
<!--				</span>-->
<!--			{{/if}}-->
<!--		</div>-->
<!--		{{/each}}-->
<!--	</div>-->
<!--	{{/each}}	-->
<!--	<div class="row cl">-->
<!--		<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">-->
<!--			<button class="btn btn-primary radius" type="button" id="submit-advanced-query"><i class="Hui-iconfont">&#xe665;</i>查询</button>-->
<!--			<button class="btn btn-warning radius" type="button" id="submit-advanced-query-reset">&nbsp;&nbsp;显示全部&nbsp;&nbsp;</button>-->
<!--			<button class="btn btn-default radius" type="button" onclick="saveFormValue(advancedQueryParameters);layer.close(currIndex);">&nbsp;&nbsp;关闭&nbsp;&nbsp;</button>-->
<!--		</div>-->
<!--	</div>-->
<!--</form>	-->
<!--</article>-->
<!--</script>   -->

<!-- edit页面各表单控件模板 -->
<script id="form-control-template" type="text/x-handlebars-template">
	<article class="page-container">
	<form action="" method="post" class="form form-horizontal" id="form-edit">
	{{#each this}}
		{{#if label}}
		<div class="row cl {{#if edit}}editFlag{{/if}}" {{#if edit}}style="display: none"{{/if}}>
			<label class="form-label col-xs-4 col-sm-3">{{#if reminder}}<a style="text-decoration: none;" href="javascript:layer.alert('{{reminder}}', {title:'提示', shadeClose:'true'});"><i class="Hui-iconfont" style="color:green;">&#xe6cd;</i></a>{{/if}}{{#if required}}<span class="c-red">*</span>{{/if}}{{{label}}}: </label>
			<div class="formControls col-xs-8 col-sm-9">
				{{#if objText}}
					<span id="{{objText}}"></span>
				{{/if}}
				{{#if input}}
				{{#each input}}
					<input type="{{#if hidden}}hidden{{else}}text{{/if}}" class="input-text radius" id="{{name}}" name="{{name}}"
						{{#if value}}value='{{value}}'{{/if}} {{#if placeholder}}placeholder="{{placeholder}}"{{/if}}>{{#if embellish}}{{{embellish}}}{{/if}}
				{{/each}}
				{{/if}}
				{{#if select}}
				{{#each select}}
					<span class="select-box radius" style="width:{{#if width}}{{ width }}{{else}}400{{/if}}px;">
			  			<select class="select" size="1" id="{{name}}" name="{{name}}">
							{{#with option}}
							{{#each this}}
								<option value="{{value}}" {{selected}}>{{text}}</option>
							{{/each}}
							{{/with}}
			  		 	</select>
             		 </span>{{#if embellish}}{{{embellish}}}{{/if}}
				{{/each}}
				{{/if}}
				{{#if button}}
				{{#each button}}
					<input type="button"  class="btn btn-{{style}} radius {{markClass}} size-S"  value="{{value}}" id="{{name}}"/>{{#if embellish}}{{{embellish}}}{{/if}}
				{{/each}}
				{{/if}}
				{{#if textarea}}
				{{#each textarea}}
					<textarea class="textarea radius" {{#if placeholder}}placeholder="{{placeholder}}"{{/if}} id="{{name}}" name="{{name}}" {{#if value}}value="{{value}}"{{/if}}></textarea>{{#if embellish}}{{{embellish}}}{{/if}}
				{{/each}}
				{{/if}}
			</div>
		</div>
	{{else}}
		<input type="hidden" id="{{name}}" name="{{name}}" {{#if value}}value='{{value}}'{{/if}}/>
	{{/if}}
	{{/each}}
	<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">&nbsp;&nbsp;<input class="btn btn-primary radius" type="button" onclick="layer.closeAll('page');" value="&nbsp;&nbsp;返回&nbsp;&nbsp;">
			</div>
	</div>
	</form>
</article>
</script>
<!-- 公用部分结束 -->


<!--tdp-->
<!-- 测试集中测试用例排序 -->
<script id="sort-set-cases" type="text/x-handlebars-template">
	<div style="margin:15px;">
		<input class="btn btn-danger radius" type="button" id="save-set-cases-sort" value="确认保存"/>
		&nbsp;&nbsp;
		<input class="btn btn-danger radius" type="button" id="reset-set-cases-sort" value="还原" />
		<div style="margin-bottom:16px;"></div>
		<ul id="set-cases">
			{{#each this}}
			<li style="margin-bottom:10px;" data-id="{{map_id}}"><input class="btn btn-success radius size-M" type="button" value="{{case_num}} - {{case_title}}" ></li>
			{{/each}}
		</ul>
	</div>
</script>

<!--测试用例总测试步骤排序-->
<script id="sort-case-steps" type="text/x-handlebars-template">
	<div style="margin:15px;">
		<input class="btn btn-danger radius" type="button" id="save-case-steps-sort" value="确认保存"/>
		&nbsp;&nbsp;
		<input class="btn btn-danger radius" type="button" id="reset-case-steps-sort" value="还原" />
		<div style="margin-bottom:16px;"></div>
		<ul id="case-steps">
			{{#each this}}
			<li style="margin-bottom:10px;" data-id="{{id}}"><input class="btn btn-success radius size-M" type="button" value="{{step_name}}" ></li>
			{{/each}}
		</ul>
	</div>
</script>

<!-- 测试任务详情汇总 -->
<script id="task-case_summary" type="text/x-handlebars-template">
	<div style="margin:15px;">
		<div class="mb-10">
				{{#if refreshFlag}}
					<button class="btn btn-default radius" type="button" id="open-summary-refresh">
						关闭自动刷新
					</button>
				{{else}}
					<button class="btn btn-primary radius" type="button" id="open-summary-refresh">
						开启自动刷新
					</button>
				{{/if}}
			&nbsp;<span style="color:red;">点击测试集名称查看实时日志</span>
		</div>
		<table class="table table-border table-bordered radius">
			<thead>
				<tr>
					<th>测试集</th>
					<th>执行机</th>
					<th>用例总数</th>
					<th>已执行数</th>
					<th>成功数</th>
					<th>失败数</th>
					<th>状态</th>
				</tr>
			</thead>
			<tbody>
				{{#each summaryRow}}
					<tr>
						<td>
							{{#if_eq testset_name '汇总'}}
							{{ testset_name }}
							{{else}}
							<a class="maincolor view-set-log" href="javascript:;" data-id="{{ result_set_id }}">{{ testset_name }}</a>
							{{/if_eq}}
						</td>
						<td>{{ executor_name }}</td>
						<td><span class="label label-primary radius"> &nbsp;{{ case_count }}&nbsp; </span></td>
						<td><span class="label label-secondary radius"> &nbsp;{{ case_executed_count }} &nbsp;</span></td>
						<td><span class="label label-success radius"> &nbsp;{{ case_success_count }}&nbsp; </span></td>
						<td><span class="label label-danger radius"> &nbsp;{{ case_failed_count }}&nbsp; </span></td>
						<td>
							{{#if_eq status 'completed' }}
							<span class="label label-success radius">{{ status }}</span>
							{{else}}
							{{status}}
							{{/if_eq}}
						</td>
					</tr>
				{{/each}}
			</tbody>
		</table>
	</div>
</script>

<!--测试集的日志-->
<script id="task-set-log-view" type="text/x-handlebars-template">
	<div style="margin:15px;">
		<div class="panel panel-default">
			<div class="panel-header">{{setName}}</div>
			<div class="panel-body" id="taskSetLogView">
				{{{ setlog }}}
			</div>
		</div>
	</div>
</script>

<!--测试计划配置-->
<script id="test-plan-exec-config" type="text/x-handlebars-template">
	<article class="page-container">
		<form action="" method="post" class="form form-horizontal">
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-5">平台类型：</label>
				<div class="formControls col-xs-8 col-sm-7">
				<span class="select-box radius">
				<select class="select" size="1" id="platformName" name="platformName" value="{{{inputValue platformName 'desktop'}}}">
						<option value="desktop">desktop</option>
						<option value="android">android</option>
						<option value="ios">ios</option>
				</select>
				</span>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-5">浏览器：</label>
				<div class="formControls col-xs-8 col-sm-7">
				<span class="select-box radius">
				<select class="select" size="1" id="browserName" name="browserName" value="{{{inputValue browserName 'chrome'}}}">
						<option value="chrome">chrome</option>
						<option value="ie">ie</option>
						<option value="firefox">firefox</option>
				</select>
				</span>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-5">App测试配置</label>
				<div class="formControls col-xs-8 col-sm-7">
                    <textarea class="textarea radius" name="appConfig" id="appConfig">{{{inputValue appConfig ''}}}</textarea>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-5">元素定位超时时间(秒)：</label>
				<div class="formControls col-xs-8 col-sm-7">
					<input type="text" class="input-text radius" name="findElementTimeout" id="findElementTimeout" value="{{{inputValue findElementTimeout '5'}}}">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-5">页面加载超时时间(秒)：</label>
				<div class="formControls col-xs-8 col-sm-7">
					<input type="text" class="input-text radius" name="pageLoadTimeout" id="pageLoadTimeout" value="{{{inputValue pageLoadTimeout '90'}}}">
				</div>
			</div>
		</form>
	</article>
</script>


<script id="web-test-config-view" type="text/x-handlebars-template">
	<article class="page-container">
		<form action="" method="post" class="form form-horizontal">
			<div class="row cl">
				<div class="formControls col-xs-12 col-sm-12">
					<strong>自定义测试数据:&nbsp;&nbsp;</strong>
					<button class="btn btn-primary radius" type="button" id="web-test-config-add-variable"><i class="Hui-iconfont">&#xe600;</i> 增加</button>&nbsp;&nbsp;
					<button class="btn btn-danger radius" type="button" id="web-test-config-clear-all-varibale"><i class="Hui-iconfont">&#xe6e2;</i> 清除所有</button>
					<br>
					<input type="hidden" id="settingType" value="{{settingType}}" />
					<div id="web-test-config-variables">
						{{#if default_data}}
						{{#each default_data}}
						<div class="row cl">
							<div class="form-label col-xs-5 col-sm-5">
								<input type="text" class="input-text radius" value='{{@key}}'>
							</div>
							<div class="formControls col-xs-5 col-sm-5">
								<input type="text" class="input-text radius" value='{{this}}'>
							</div>
							<div class="formControls col-xs-2 col-sm-2">
								<a class="btn btn-default radius"><i class="Hui-iconfont">&#xe60b;</i></a>
							</div>
						</div>
						{{/each}}
						{{/if}}
					</div>
				</div>
			</div>
			<input type="hidden" id="layerIndex"/>
			<div class="row cl" style="margin-top:18px;">
				<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
					<button class="btn btn-success radius" type="button" id="update-web-test-config"><i class="Hui-iconfont">&#xe632;</i> 更新配置</button>
					<button class="btn btn-default radius" type="button" onclick="layer.close($(this).parents('form').find('#layerIndex').val());">&nbsp;&nbsp;关闭&nbsp;&nbsp;</button>
				</div>
			</div>
		</form>
	</article>
</script>


<!--用例片段的配置-->
<script id="tdp-step-snippet-setting" type="text/x-handlebars-template">
	<article class="page-container">
		<form action="" method="post" class="form form-horizontal">
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">执行次数：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<input type="text" class="input-text radius" name="executeCount" id="executeCount" value="{{{inputValue executeCount '1'}}}">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">退出条件：</label>
				<div class="formControls col-xs-8 col-sm-9">
				<span class="select-box radius">
				<select class="select" size="1" id="exitCondition" name="exitCondition" value="{{{inputValue skipFlag ''}}}">
						<option value="">执行指定次数之后退出</option>
						<option value="false">执行失败时退出</option>
						<option value="true">执行成功时退出</option>
				</select>
			</span>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">失败后否继续：</label>
				<div class="formControls col-xs-8 col-sm-9">
			<span class="select-box radius">
				<select class="select" size="1" id="errorStillRun" name="errorStillRun" value="{{{inputValue errorStillRun 'false'}}}">
						<option value="false">否</option>
						<option value="true">是</option>
				</select>
			</span>
				</div>
			</div>
		</form>
	</article>
</script>

<!--tdp-->
